libarchive: Make autocreate_parents imply autocreating root dir
authorColin Walters <walters@verbum.org>
Mon, 22 Feb 2016 16:18:30 +0000 (11:18 -0500)
committerColin Walters <walters@verbum.org>
Mon, 22 Feb 2016 22:02:31 +0000 (17:02 -0500)
commit30c5fb1a5116e517a9d2e4df9cdc1fbd0249c965
tree6647dd8a3b974d9488b8703282050efbaab8020e
parent11b3050fd73562d8d0caed948a5b421a68d0d793
libarchive: Make autocreate_parents imply autocreating root dir

Some Docker layers are just metadata in the `layer.json`.  If one is
mapping Docker layers to OSTree commits, one needs to create a dummy
root directory, because OSTree doesn't support metadata-only commits.

Let's just push that logic down here because it's easier than special
casing it in higher levels.
src/libostree/ostree-repo-libarchive.c
tests/test-libarchive-import.c